﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Balder.Materials;
using Balder.Execution;

namespace Spritehand.Physics3D
{
    public class Materials
    {


        private static Material _sand;
        public static Material Sand
        {
            get
            {
                if (_sand == null)
                {
                    // sand texture
                    Material material = new Material()
                    {
                        DiffuseMap = new ImageMap(Runtime.Instance.ContentManager.Load<Balder.Imaging.Image>("/Spritehand.Physics3D;component/content/sand.png")),
                        DiffuseMapOpacity = 1,
                        Opacity = 1,
                        DoubleSided = true,
                    };
                    _sand = material;
                }

                return _sand;
            }
        }

        private static Material _crate;
        public static Material Crate
        {
            get
            {
                if (_crate == null)
                {
                    // sand texture
                    Material material = new Material()
                    {
                        DiffuseMap = new ImageMap(Runtime.Instance.ContentManager.Load<Balder.Imaging.Image>("/Spritehand.Physics3D;component/content/crate.jpg")),
                        DiffuseMapOpacity = 1,
                        Opacity = 1,
            
                        DoubleSided = true,
                    };
                    _crate = material;
                }

                return _crate;
            }

        }

        private static Material _red;
        public static Material Red
        {
            get
            {
                if (_red == null)
                {
                    // sand texture
                    Material material = new Material()
                    {
                        Diffuse = new Balder.Color(255,0,0,255),
                        DiffuseMapOpacity = 1,
                        Opacity = 1,

                        DoubleSided = true,
                    };
                    _red = material;
                }

                return _red;
            }

        }

        private static Material _yellow;
        public static Material Yellow
        {
            get
            {
                if (_yellow == null)
                {
                    // sand texture
                    Material material = new Material()
                    {
                        Diffuse = new Balder.Color(255, 255, 0, 255),
                        DiffuseMapOpacity = 1,
                        Opacity = 1,

                        DoubleSided = true,
                    };
                    _yellow = material;
                }

                return _yellow;
            }

        }
    }
}
